package com.by.erpsale.controller;

import com.by.erpsale.remote.StockRemoteClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

/**
 * description:
 * author:zcx
 * lenovo
 * 时间：2022.06.08.18.59
 */
@RestController
public class SaleController {
    @Autowired
    StockRemoteClient stockRemoteClient;

    @GetMapping("/sale/query")
    public Map query(){

        Map map=new HashMap<>();
        map.put("saveNum","xs2022=0001");
        Map rs=stockRemoteClient.query();
        map.put("stock",rs);
        System.out.println(rs);
        return map;
    }
}
